package chixing.day07.work;

public class MyOrder {
    private int orderId;
    private String orderNumber;
    private float orderPrice;
    private int orderStatus;  // 订单状态，0：未支付，1：已支付，2： 已取消

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public float getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(float orderPrice) {
        this.orderPrice = orderPrice;
    }

    public int getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(int orderStatus) {
        this.orderStatus = orderStatus;
    }
// 构造函数，getter和setter略

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if(!obj.getClass().getName().equals(this.getClass().getName())){
            return false;
        }
        if(this==obj){
            return true;
        }
        MyOrder o2 = (MyOrder)obj;
        return this.orderId==o2.orderId&&this.orderPrice==o2.orderPrice&&this.orderStatus==o2.orderStatus;
    }
}
